package com.sanyang.pda.adapter;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sanyang.pda.bean.PickingDetailBean;
import com.sanyang.pda.utils.Utils;
import com.wangshen.base.ui.mvp.base.adapter.BaseAdapter;
import com.wangshen.projectbase.R;

import java.util.List;

public class PickingDetailAdapter extends BaseAdapter<PickingDetailBean> {
    public PickingDetailAdapter(int layoutResId, @Nullable List<PickingDetailBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, PickingDetailBean item) {
        super.convert(helper, item);
        helper.setText(R.id.tv_title,item.getArticleName());
        helper.setText(R.id.tv_goods_code,item.getArticleId());
        helper.setText(R.id.tv_storagebinId,item.getStoragebinId());
        helper.setText(R.id.tv_currentStoragebin,item.getCurrentStoragebin());
        helper.setText(R.id.tv_amount,item.getStockNum()+"");
        helper.setText(R.id.tv_state, Utils.getDeliveryStatus(getContext(),item.getDeliveryStatus()));
    }
}
